package crudfx.navigation;
import javax.swing.*;
import crudfx.interop.*;
/**
 * @profile desktop
 * @author Sergey Surikov
 */
public class PopUp {
    var popup:JPopupMenu;
    init{
        popup=new JPopupMenu();
        setItems();
        }
    public var items:MenuPad[] on replace {setItems();};
    function setItems(){
        popup.removeAll();
        for(i:MenuPad in items){i.addPopUp(popup);}
        }
    public function show(c:UIComponent,x:Integer,y:Integer):Void{
        popup.show(c.getJComponent(),x,y);
        }
    }
